package com.sak.vis.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sak.vis.domain.Result;

@Service
public class QueryServiceImpl implements QueryService {

	@Autowired(required = true)
	private ExternalClientService justDialExternalClientService;

	@Override
	public List<Result> query(String queryText) {
		//TODO Figure out location from the query text, and use it in querying external clients
		
		//TODO Use in memory lucene to return best results
		
		List<Result> justDialResults = justDialExternalClientService.queryClient(queryText, "");
		return justDialResults;
	}

	// Getters and Setters

	public void setJustDialExternalClientService(
			ExternalClientService justDialExternalClientService) {
		this.justDialExternalClientService = justDialExternalClientService;
	}

}
